<?php
namespace app\common;
use think\Controller;

class BaseController extends \think\Controller
{

    public static $a = 1;
    Const ADMIN_ID = 1;
    public $isAdmin = false;
    public $isUser = true;
    protected function initialize()
    {
    	//自动生成route
    
        $role_id = session('role_id');
        $this->isAdmin = $role_id === 1 ? true : false;
        $this->isUser = $role_id === 0 ? false : true;
    }

    public function getUid(){
    	return cookie('uid');
    }
}
